<?php

namespace Business;

class Account extends \Lib\Core\Business {

    public function getByAccount($account) {
        $info = \Data\Account::instance()->getByAccount($account);
        return $info;
    }

    public function getInfoById($id) {
        $info = \Data\Account::instance()->getInfoById($id);
        return $info;
    }

    public function updatePassword($accountId, $newPassword) {
        return \Data\Account::instance()->updatePassword($accountId, $newPassword);
    }

    public function getGroupList() {
        return \Data\AccountGroup::instance()->getGroupList();
    }

    public function updateGroupRoles($groupId, $roles) {
        return \Data\AccountGroup::instance()->updateGroupRoles($groupId, $roles);
    }

    public function add($account, $password, $groupId) {
        return \Data\Account::instance()->add($account, $password, $groupId);
    }

}